
#  定义 一个函数  将 json 转化为 元组列表 形式
# import json
# list1 = []
# def add():
#     with open("data.json","r",encoding="utf8")as f:
#         json1 = json.load(f)
#     for i in json1:
#         tuple1 = tuple(i.values())
#         list1.append(tuple1)
#     return list1
#     # name = json1.get("name")
#     # school = json1.get("school")
#     # print(name)
#     # print(school)
#
#
# print(add())

def input_num():
    try:
        num = int(input('请输入数字:'))
    except ValueError:
        print('输入错误!非数字！')
    else:
        if num % 2 == 0:
            print('输入的数据: {}, 是偶数!'.format(num))
        else:
            print('输入的数据: {}, 是奇数!'.format(num))
    finally:
        print('程序运行结束!')

if __name__ == '__main__':
    input_num()


